package com.crazymaker.springcloud.message.dao;

import com.crazymaker.springcloud.message.dao.po.MsgPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by 尼恩 on 2019/7/18.
 */
@Repository
public interface MsgDao extends JpaRepository<MsgPO, Long>, JpaSpecificationExecutor<MsgPO>
{

    /**
     * 自定义查询
     */
    @Query("select m from MsgPO m where m.msgId = ?1 ")
    MsgPO findByMsgId(Long msgId);
}



